编写一程序判断数组int a[6][6]是否是一个上三角。
来源:百度知道 编辑:UC知道 时间:2024/05/17 18:06:45
#include<iostream.h>
#include<math.h>
void main()
{
int i, j ,s=0;
int a[6][6];
for(i = 0; i < 6; i++)
for(j = 0; j < 6; j++)
cin>>a[i][j];
for(i = 0; i < 6; i++)
for(j = 0; j <i ; j++)
s=s+abs(a[i][j]);
if (s==0)
cout<< "是一个上三角 " ;
else
cout<< "不是一个上三角 " ;
}
编写一程序判断数组int a[6][6]是否是一个上三角。
编写一程序,关于数组的
编写函数void fun(int *a,int *n,int y)它的功能是把y插入到a数组中使其次序不变
编写一个程序,逆序放置a数组中的元素
用类的方法判断数组int a[6][6]是否是一个上三角。
编写函数int fun(int a[],int n),其功能是求一维数组中前n个数的最大值,最大值作为函数返回值。
编写一个C程序 其首部为int[chars[i]函数 功能是统计出字符,数组,中英文的个数
编写一个程序实现数组
java中的数组赋值给数组问题int[ ] a=new int[10];int[ ] b=new int[8];
请编写一个函数void fun(int a[],int n, int *max,int *d)